package com.sans.oop;

import org.junit.Test;

/**
 * @author Sans
 */
public class OverloadTest {
    static class Demo {
        public static Integer add(int a,int b){return a+b;}
        public static Double add(double a,double b){return a+b;}
        public static Double add(int a,double b){return a+b;}
        public static Double add(double a,int b){return a+b;}
    }
    @Test
    public void add(){
        System.out.println(Demo.add(1,2));
        System.out.println(Demo.add(1.5,2.5));
        System.out.println(Demo.add(1,2.5));
        System.out.println(Demo.add(1.5,2));
    }
}
